/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.parameter_constraints;

import picounit.ByteArrayParameterConstraints;
import picounit.features.constraint_store.ConstraintStore;

public class JMockByteArrayConstraints implements ByteArrayParameterConstraints {
	private final ConstraintStore constraintStore;
	private final BasicParameterConstraints basicParameterConstraints;

	public JMockByteArrayConstraints(ConstraintStore constraintStore) {
		this(constraintStore, new BasicParameterConstraints());
	}

	public JMockByteArrayConstraints(ConstraintStore constraintStore, BasicParameterConstraints basicParameterConstraints) {
		this.constraintStore = constraintStore;
		this.basicParameterConstraints = basicParameterConstraints;
	}

	public byte[] aByteArray() {
		return constraintStore.putByteArray(basicParameterConstraints.isAnything());
	}
}
